package com.lyz.dataStructure.zijietiaodong;

import java.util.HashMap;
import java.util.Hashtable;
import java.util.Map;

/**
 *@Author:759057893@qq.com Lyz
 *@Date: 2019/4/18 21:13
 *@Description:
 **/

/*
十进制转二进制
 */
public class Test3 {

    public static void main(String[] args) {
        Map<Integer,String> map =new HashMap<Integer,String>();
        map.put(1,"中国");
        map.put(0,null);
        System.out.println(map.get(0));
        System.out.println(map.get(1));
        System.out.println(map.isEmpty());
        Hashtable hashtable = new Hashtable();
    }

    public void binaryToDecimal(int n){
        String str = "";
        while(n!=0){
            str = n%2+str;
            n = n/2;
        }
        System.out.println(str);
    }
}
